using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._SpatialAnalystTools._Hydrology
{
    /// <summary>
    /// <para>Watershed</para>
    /// <para>Determines the contributing area above a set of cells in a raster.</para>
    /// <para>确定栅格中一组像元上方的参与区域。</para>
    /// </summary>    
    [DisplayName("Watershed")]
    public class Watershed : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public Watershed()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_flow_direction_raster">
        /// <para>Input D8 flow direction raster</para>
        /// <para><xdoc>
        ///   <para>The input raster that shows the direction of flow out of each cell.</para>
        ///   <para>The flow direction raster can be created using the Flow Direction tool, run using the default flow direction type D8.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>显示流出每个像元的方向的输入栅格。</para>
        ///   <para>可以使用流向工具创建流向栅格，该工具使用默认流向类型 D8 运行。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_in_pour_point_data">
        /// <para>Input raster or feature pour point data</para>
        /// <para><xdoc>
        ///   <para>The input pour point locations.</para>
        ///   <para>For a raster, this represents cells above which the contributing area, or catchment, will be determined. All cells that are not NoData will be used as source cells.</para>
        ///   <para>For a point feature dataset, this represents locations above which the contributing area, or catchment, will be determined.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输入倾倒点位置。</para>
        ///   <para>对于栅格，这表示将确定贡献区域或集水区高于该区域的像元。所有不是 NoData 的单元格都将用作源单元格。</para>
        ///   <para>对于点要素数据集，这表示将确定贡献区域或集水区的位置。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_out_raster">
        /// <para>Output raster</para>
        /// <para><xdoc>
        ///   <para>The output raster that shows the contributing area.</para>
        ///   <para>This output is of integer type.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>显示贡献区域的输出栅格。</para>
        ///   <para>此输出为整数类型。</para>
        /// </xdoc></para>
        /// </param>
        public Watershed(object _in_flow_direction_raster, object _in_pour_point_data, object _out_raster)
        {
            this._in_flow_direction_raster = _in_flow_direction_raster;
            this._in_pour_point_data = _in_pour_point_data;
            this._out_raster = _out_raster;
        }
        public override string ToolboxName => "Spatial Analyst Tools";

        public override string ToolName => "Watershed";

        public override string CallName => "sa.Watershed";

        public override List<string> AcceptEnvironments => ["autoCommit", "cellSize", "cellSizeProjectionMethod", "compression", "configKeyword", "extent", "geographicTransformations", "mask", "outputCoordinateSystem", "parallelProcessingFactor", "scratchWorkspace", "snapRaster", "tileSize", "workspace"];

        public override object[] ParameterInfo => [_in_flow_direction_raster, _in_pour_point_data, _out_raster, _pour_point_field];

        /// <summary>
        /// <para>Input D8 flow direction raster</para>
        /// <para><xdoc>
        ///   <para>The input raster that shows the direction of flow out of each cell.</para>
        ///   <para>The flow direction raster can be created using the Flow Direction tool, run using the default flow direction type D8.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>显示流出每个像元的方向的输入栅格。</para>
        ///   <para>可以使用流向工具创建流向栅格，该工具使用默认流向类型 D8 运行。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input D8 flow direction raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_flow_direction_raster { get; set; }


        /// <summary>
        /// <para>Input raster or feature pour point data</para>
        /// <para><xdoc>
        ///   <para>The input pour point locations.</para>
        ///   <para>For a raster, this represents cells above which the contributing area, or catchment, will be determined. All cells that are not NoData will be used as source cells.</para>
        ///   <para>For a point feature dataset, this represents locations above which the contributing area, or catchment, will be determined.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输入倾倒点位置。</para>
        ///   <para>对于栅格，这表示将确定贡献区域或集水区高于该区域的像元。所有不是 NoData 的单元格都将用作源单元格。</para>
        ///   <para>对于点要素数据集，这表示将确定贡献区域或集水区的位置。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input raster or feature pour point data")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_pour_point_data { get; set; }


        /// <summary>
        /// <para>Output raster</para>
        /// <para><xdoc>
        ///   <para>The output raster that shows the contributing area.</para>
        ///   <para>This output is of integer type.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>显示贡献区域的输出栅格。</para>
        ///   <para>此输出为整数类型。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_raster { get; set; }


        /// <summary>
        /// <para>Pour point field</para>
        /// <para><xdoc>
        ///   <para>The field used to assign values to the pour point locations.</para>
        ///   <para>If the pour point dataset is a raster, use Value.</para>
        ///   <para>If the pour point dataset is a feature, use a numeric field. If the field contains floating-point values, they will be truncated into integers.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>用于为倾点位置分配值的字段。</para>
        ///   <para>如果倾点数据集为栅格，请使用值。</para>
        ///   <para>如果倾点数据集是要素，请使用数值字段。如果字段包含浮点值，则它们将被截断为整数。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Pour point field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _pour_point_field { get; set; } = null;


        public Watershed SetEnv(int? autoCommit = null, object cellSize = null, object compression = null, object configKeyword = null, object extent = null, object geographicTransformations = null, object mask = null, object outputCoordinateSystem = null, object parallelProcessingFactor = null, object scratchWorkspace = null, object snapRaster = null, double[] tileSize = null, object workspace = null)
        {
            base.SetEnv(autoCommit: autoCommit, cellSize: cellSize, compression: compression, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, mask: mask, outputCoordinateSystem: outputCoordinateSystem, parallelProcessingFactor: parallelProcessingFactor, scratchWorkspace: scratchWorkspace, snapRaster: snapRaster, tileSize: tileSize, workspace: workspace);
            return this;
        }

    }

}